package com.example.demo.service.impl;

import com.example.demo.dto.NurPatientRelDTO;
import com.example.demo.entity.NurPatientRel;
import com.example.demo.entity.Nurse;
import com.example.demo.entity.SocType;
import com.example.demo.mapper.SocMapper;
import com.example.demo.service.SocService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class SocServiceImpl implements SocService {
    @Autowired
    private SocMapper socMapper;

    @Override
    public int addSocType(String typename) {
        return socMapper.addSocType(typename);
    }

    @Override
    public List<SocType> findSocType() {
        return socMapper.findSocType();
    }

    @Override
    public List<Nurse> findAllNurse() {
        return socMapper.findAllNurse();
    }
    @Override
    public List<Nurse> findNurseByPage(Integer startNum,Integer size) {
        return socMapper.findNurseByPage(startNum,size);
    }

    @Override
    public int nurPatientRel(Map<String, String> map) {
        return socMapper.nurPatientRel(map);
    }

    @Override
    public List<NurPatientRelDTO> findAllRel(Integer startNum, Integer size) {
        return socMapper.findAllRel(startNum,size);
    }

    @Override
    public int findRelTotal() {
        return socMapper.findRelTotal();
    }

    @Override
    public int findNurseTotal() {
        return socMapper.findNurseTotal();
    }

    @Override
    public int addNurse(Map<String, String> map) {
        return socMapper.addNurse(map);
    }

    @Override
    public int updateNurse(Map<String, String> map) {
        return socMapper.updateNurse(map);
    }

    @Override
    public int delNurse(Integer nid) {
        return socMapper.delNurse(nid);
    }
}
